package com.thyrsus.project.controller.user;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttributes;

import com.thyrsus.project.service.user.UserService;

import org.apache.log4j.Logger;

@Controller
@SessionAttributes
public class DeleteUserController {
	
	static Logger LOGGER = Logger.getLogger(ConnexionUserController.class);
	
	@Autowired
	UserService userService;
	
	@RequestMapping(value = "/user/delete")
    public String doDelete(HttpServletRequest request,HttpServletResponse response) {
		userService.delete();
		return "redirect:/home";
	}
}
